AMD/IOMMU: disable previously enabled IOMMUs upon init failure
authorJan Beulich <jbeulich@suse.com>
Thu, 6 Jun 2019 12:06:49 +0000 (14:06 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 6 Jun 2019 12:06:49 +0000 (14:06 +0200)
commit59ae17050745d6e9f26a99b19dc45a2fa7217dd4
tree431fab7cee043c62dbf7794f0a5dfcc1cb44cd2a
parent45342cd88d564a7da2dfbbc921898805008b0b6c
AMD/IOMMU: disable previously enabled IOMMUs upon init failure

If any IOMMUs were successfully initialized before encountering failure,
the successfully enabled ones should be disabled again before cleaning
up their resources.

Move disable_iommu() next to enable_iommu() to avoid a forward
declaration, and take the opportunity to remove stray blank lines ahead
of both functions' final closing braces.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Brian Woods <brian.woods@amd.com>
master commit: 87a3347d476443c66c79953d77d6aef1d2bb3bbd
master date: 2019-05-13 09:52:43 +0200
xen/drivers/passthrough/amd/iommu_init.c